<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@page import="cn.netjava.pojo.User;"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>write an article page</title>
    <script type="text/javascript" src="fckeditor/fckeditor.js"></script>
    
    <link rel="stylesheet" type="text/css" href="css/personblogpage.css" />
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->

  </head>
  
  <body>
     <div id="container">
       <div id="front">
          <jsp:include page="personfront.jsp"></jsp:include>
       </div>
       
       <div id="main">
         <%User loginUser =(User)session.getAttribute("loginUser"); 
             if(null!=loginUser){
                int uid =Integer.parseInt(request.getParameter("uid"));
                if(loginUser.getId()==uid){%>         
         <form action="writearticle.cn" method="POST">
                文章题目：<input type="text" name="article_title" size="50" />
             <br>
                文章栏目：<select size="1" name="article_colum">
                       <option value="生活" selected="selected" > 生活 </option>
                       <option value="学习"> 学习 </option> 
                       <option value="工作"> 工作 </option> 
                     </select>
             <br>
                文章类型：<input type="text" name="article_type" />
             <br>
		     <script type="text/javascript">
			     //新建一个FCK实例
			     var oFCKeditor = new FCKeditor('FCKeditor1');
			     //设计编辑器的文件的路径
			     oFCKeditor.BasePath = "/blog/fckeditor/";
			     oFCKeditor.Width="880";
			     oFCKeditor.Height="500";
			     oFCKeditor.ToolbarSet="WriteBlog";
			     oFCKeditor.Create();
			</script>
			<br>
			<input type="submit" value="提交" />
			 <%}else{%>
                   对不起，你不是本人，无权执行这个操作！！！
             <% }}else{ %>
                对不起，你还没有登陆，不能执行这个操作！！！
             <%} %>
		</form>
	  </div>
	  
	  <jsp:include page="../footer.jsp"></jsp:include>
	</div>
  </body>
</html>
